Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Educator version #948

Open
wants to merge 137 commits into
base: main
Choose a base branch
from

Conversation

sabrinanel3
Copy link
Contributor

@sabrinanel3 sabrinanel3 commented Jul 23, 2024

Provide educator version of Port of Mars for MS/HS students and teachers

dashboard for classroom and student account management

Current plans are to deploy at https://learn.portofmars.asu.edu

TODO:

  • virtualcommons/planning#71
  • fix the 15s delay when starting games
  • virtualcommons/planning#78 @sabrinanel3
  • add explainer content to landing page and teacher dashboard @saachibm
  • fix: privacy policy page somehow inserted into game dashboard

@alee
Copy link
Member

alee commented Aug 15, 2024

Currently failing on staging deployment with TS errors:

 > [server pom-server-base 9/9] RUN npm run build   && cp tsconfig.json package.json lib/server/:
2.903
2.903 > [email protected] build
2.903 > tsc -p .
2.903
25.90 tests/services/educator.test.ts(62,5): error TS2322: Type 'Classroom | null' is not assignable to type 'Classroom'.
25.90   Type 'null' is not assignable to type 'Classroom'.
25.90 tests/services/educator.test.ts(70,5): error TS2322: Type 'Classroom | null' is not assignable to type 'Classroom'.
25.90   Type 'null' is not assignable to type 'Classroom'.
------
failed to solve: process "/bin/sh -c npm run build   && cp tsconfig.json package.json lib/server/" did not complete successfully: exit code: 2
make: *** [Makefile:78: build] Error 17

saachibm and others added 27 commits August 27, 2024 16:48
- a Teacher can have multiple Classrooms
- a Classroom can have multiple Students
- Students are one-to-one with Users which lets them participate in Games
- Teachers are one-to-one with Users which lets them sign into the
  website (may need to revisit this part of the schema)

Co-authored-by: Tkawamura02 <[email protected]>
Co-authored-by: Allen Lee <[email protected]>
Co-authored-by: Scott Foster <[email protected]>
Co-authored-by: Sabrina Nelson <[email protected]>
pending a feature flag, these routes/components will be part of an entirely different layout

Co-authored-by: sbmota <[email protected]>
Co-authored-by: Allen Lee <[email protected]>
Co-authored-by: Sabrina Nelson <[email protected]>
isTeacher flag gets added to the user object in client state when
needed

We should be able to get away with no other (or very minimal)
changes to the client state by repurposing the lobby object similar to
how we do so for freeplay/tournament lobbies
* moved dev login function on the client to AuthAPI

TODO:
* add generation of a passcode for signing back in as an existing
  student. either create a new strategy or modify existing to also take
  this auth token for signing back in
* create the rest of the login flow, intermediate page for entering
  name, signing back in (passcode can be the response from a set-name
  call)

Co-authored-by: saachibm <[email protected]>
Co-authored-by: Sabrina Nelson <[email protected]>
…in classroom lobby components for student-confirm page
+ some minor cleanup

CONTAINS MIGRATION
ref virtualcommons#943

Co-authored-by: Sabrina Nelson <[email protected]>
Co-authored-by: Kelly Tran <[email protected]>
Co-authored-by: Allen Lee <[email protected]>
classroom authToken, and student rejoinCode.

+ created test suites
STEPS TO UPDATE LOCAL ENV:

- make clean
- ./configure dev
- make .env
- (optionally) update SHARED_APP_MODE in .env, new way to set educator
  mdoe
- make deploy
sgfost and others added 20 commits October 16, 2024 16:13
* classroom selection is now done by id to retain a reference
* fixed some vue errors in TeacherDashboard component
* DELETE /classroom/ now responds with a 200 status on success

* prevent login form submissions from trying to redirect to a new page
adds a tournament + round for educator mode, some form of active
tournament is still needed for starting games and not breaking
everything

* prevent default on student confirmation page
…dashboard

 added inspect data route to dashboard
- restyled modals
- fixed type errors
- dashboard UI fixes
isTeacher and isStudent roles determine access to the dashboard and
lobby respectively

* fix some type errors and remove comments
as a workaround for the game server not being available in tests
group.clients and state.clients are separate objects in the lobby, so
setting accepted on state.clients did not satisfy the condition of
group.allClientsAccepted so the timeout would always expire
to be used for building a better game 'report' for completed games

Co-authored-by: Sabrina Nelson <[email protected]>
Co-authored-by: Kelly Tran <[email protected]>
- set `SHARED_APP_MODE=educator` in `.env`
- set `DEPLOY_ENVIRONMENT=learn` in `config.mk`
@alee alee force-pushed the educator-version branch from 44ed728 to a35dba8 Compare October 16, 2024 23:13
@alee
Copy link
Member

alee commented Oct 17, 2024

currently deployed to https://learn.portofmars.asu.edu

we should set up staging for this at some point as well

@sgfost
Copy link
Contributor

sgfost commented Oct 17, 2024

Thanks. With the feature flag config remaining separate from deploy mode, just rotating on staging.portofmars.asu.edu should work fine for now

@alee alee force-pushed the educator-version branch from 8e7001a to 9048d1a Compare October 23, 2024 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants